<template>
    <div class="search-box">
        <img class="left-icon" :src="`${_oss_}images/mobile/icon-search.png`" />
        <input
            class="search-input"
            v-model="keyword"
            type="text"
            placeholder="搜索您喜欢的..."
        />
        <div class="search-btn" @click="onSearch">搜索</div>
    </div>
</template>
<script setup>
import { useContent } from ".";
import { Search } from "@element-plus/icons-vue";

const { keyword, onSearch } = useContent();
</script>
<style lang="scss" scoped>
.search-box {
    width: 351px;
    height: 40px;
    background: #fff;
    box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.21);
    border-radius: 20px;
    display: flex;
    align-items: center;
    margin: 8px auto;
    overflow: hidden;

    .left-icon {
        width: 14px;
        height: 14px;
        margin: 0 6px 0 11px;
        flex-shrink: 0;
    }

    .search-input {
        width: 100%;
        border: none;
        outline: none;
        font-size: 14px;

        &::placeholder {
            color: #999;
        }
    }

    .search-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 65px;
        height: 40px;
        background: #5085fb;
        color: #fff;
        font-size: 14px;
        letter-spacing: 4px;
        margin-left: 10px;
        flex-shrink: 0;
    }
}
</style>
